let page, config;

/**
 * 开始
 */
const start = async (pupConfig) => {
    page = pupConfig.page;
    config = pupConfig.config.common;
    await quit();
}

//退出登陆
const quit=async ()=>{
    await page.waitFor('.zc-pubilc-header-user');
    let element = await page.$(".zc-pubilc-header-user");
    const box = await element.boundingBox();
    const x = box.x + (box.width/2);
    const y = box.y + (box.height/2);
    await page.mouse.move(x,y);
  
    await page.waitFor('.ant-dropdown ul li');
    const searchBut= await page.$(".ant-dropdown ul li");
    const boxs = await searchBut.boundingBox();
    const x1 = boxs.x + (boxs.width/2);
    const y1 = boxs.y + (boxs.height/2);
    await page.mouse.click(x1,y1);
};
module.exports = start;
